import axios from '@/libs/api.request'

/**
 * 获取表格数据
 * @return {[type]}        [description]
 */
export const tableData = (params) => {
  return axios.request({
    url: '/api/forecast/getMeterListPaged',
    method: 'get',
    params
  })
}
/**
 * 获取矩形方图数据
 * @return {[type]}        [description]
 */
export const rectTreeMap = (params) => {
  return axios.request({
    url: '/api/meterManage/meyerQuery/getMeterGasCalssCountByYear',
    method: 'get',
    params
  })
}

/**
 * 表具详情
 * @return {[type]}        [description]
 */
export const getMeterDetailData = (id) => {
  return axios.request({
    url: '/api/meterManage/meyerQuery/getMeterBeanByMeterId/' + id,
    method: 'get'
  })
}

/**
 * 指数平滑数据
 * @return {[type]}        [description]
 */
export const zhishupinghuaData = (params) => {
  return axios.request({
    url: '/api/forecast/getSmoothnessIndex',
    method: 'get',
    params
  })
}

/**
 * 表格数据修改
 * @param  {[type]} params [description]
 * @return {[type]}        [description]
 */
export const xbwlsj = (params) => {
  return axios.request({
    url: '/api/forecast/getWaveletNeuralNetwork',
    method: 'get',
    params
  })
}

/**
 * description: 通过指数类型获取数据
 * param {type}
 * return:
 */
export const kxianDataByIndexType = (params) => {
  return axios.request({
    url: '/api/forecast/getMeterGasListByDate',
    method: 'get',
    params
  })
}
/**
 * description: 通过指数类型获取数据
 * param {type}
 * return:
 */
export const kxianDataByDys = (params) => {
  return axios.request({
    url: '/api/tableGas/getMeterGasByDays',
    method: 'get',
    params
  })
}

/**
 * description: 长期灰色理论模型
 * param {type}
 * return:
 */
export const greyTheoryModel = (params) => {
  return axios.request({
    url: '/api/forecast/getGreyTheoryPrediction',
    method: 'get',
    params
  })
}

/**
 * @msg: 折线图数据
 * @param {type}
 * @return:
 */
export const getZhexianByDay = (params) => {
  return axios.request({
    url: '/api/localDataMonth/getMeterDetailByDay',
    method: 'get',
    params
  })
}

/**
 * 提交修改数据
 * @return {[type]}        [description]
 */
export const submitData = (data) => {
  return axios.request({
    url: '/api/tableGas/amendment',
    method: 'post',
    data
  })
}
